'   T h e r e m i n o   A u t o m a t i o n   d e m o   p r o g r a m 
 
 
 
 '   D e m o n s t r a t i n g   r e a d   a n d   w r i t e   o f   S l o t   v a l u e s 
 
 B u t t o n   1   T e x t   F 1 
 
 B u t t o n   2   T e x t   F 2 
 
 
 
 S t o p 
 
 
 
 '   A   v a r i a b l e   i s   i n c r e m e n t e d   a n d   w r i t t e n   t o   t h e   s l o t   1 
 
 L a b e l   F 1 
 
 	 O p t i o n   S p e e d   7     '   7   m e a n s   1 0 0 0   i n s t r u c t i o n s   p e r   s e c o n d ) 
 
 	 v 1   =   0 
 
 	 L a b e l   F 1 b 
 
 	 	 S l o t ( 1 )   =   v 1 
 
 	 	 v 1   =   v 1   +   1 
 
 	 	 I f   v 1   >   1 0 0 0   	 '   i f   m o r e   t h a n   1 0 0 0 
 
 	 	 	 v 1   =   0     	 '   r e s e t   t o   z e r o 
 
 	 	 E n d I f 
 
 	 G o t o   F 1 b 
 
 R e t u r n 
 
 
 
 
 
 '   T h e   s a m e ,   b u t   u s i n g   d i r e c t l y   t h e   s l o t   v a l u e 
 
 '   T h i s   d e m o n s t r a t e s   a l s o   h o w   t o   u s e   t h e   " S p e e d   9 " 
 
 '   w h i l e   r e d u c i n g   t h e   C P U   c h a r g e   w i t h   " W a i t   S e c o n d s   0 . 0 0 1 " 
 
 L a b e l   F 2 
 
 	 O p t i o n   S p e e d   9 
 
 	 S l o t ( 1 )   =   0 
 
 	 L a b e l   F 2 b 
 
 	 	 S l o t ( 1 )   =   S l o t ( 1 )   +   1 
 
 	 	 I f   S l o t ( 1 )   >   1 0 0 0 	 '   i f   m o r e   t h a n   1 0 0 0 
 
 	 	 	 S l o t ( 1 )   =   0     	 '   r e s e t   t o   z e r o 
 
 	 	 E n d I f 
 
 	 	 W a i t   S e c o n d s   0 . 0 0 1 
 
 	 G o t o   F 2 b 
 
 R e t u r n 
 
 
 
 